
function closeWin()
{
  var index = window.parent.layer.getFrameIndex(window.name); //获取当前窗体索引
  window.parent.layer.close(index); //执行关闭
}


function rechange()
{
   var accountCoin=jQuery("#accountCoin").val();
   var userCoin=jQuery("#userCoin").val();
   if(!accountCoin)
   {
         alert("请输入充值金额。");
         return;
   }
   if(parseFloat(accountCoin)+parseFloat(userCoin)<0)
   {
         return alert("输入的扣减金额不能大于当前余额。");
   }
	 jQuery("#reChargeForm").ajaxSubmit(
           {
              type:"post",
              clearForm: true,        // 是否清空form  
              resetForm: true,       // 是否重置form  
              success:function(data)
              { 
                 var d= eval("("+data+")");
                 if(d.STATUS=="0")
                 {
                    alert("充值成功!");
                    closeWin();
                    queryUserForm(1,15);
                 }
                 else
                 {
                    alert(d.MSG);
                 }
              }
           }
          );
}